function drawBoundingBox(xBnd,yBnd,zBnd,lineWidth,color)
% drawBoundingBox(xBnd,yBnd,zBnd,lineWidth,color)
%
% This function draws the wireframe box that as described by the limits in
% xBnd, yBnd, and zBnd
%

hold on;

% Draw the bottom:
plot3(...
    [xBnd(1), xBnd(1), xBnd(2), xBnd(2), xBnd(1)],...
    [yBnd(1), yBnd(2), yBnd(2), yBnd(1), yBnd(1)],...
    [zBnd(1), zBnd(1), zBnd(1), zBnd(1), zBnd(1)],...
    'LineWidth',lineWidth','color',color);

% Draw the top:
plot3(...
    [xBnd(1), xBnd(1), xBnd(2), xBnd(2), xBnd(1)],...
    [yBnd(1), yBnd(2), yBnd(2), yBnd(1), yBnd(1)],...
    [zBnd(2), zBnd(2), zBnd(2), zBnd(2), zBnd(2)],...
    'LineWidth',lineWidth','color',color);

% Draw the sides:
plot3(...
    [xBnd(1), xBnd(1)],...
    [yBnd(1), yBnd(1)],...
    [zBnd(1), zBnd(2)],...
    'LineWidth',lineWidth','color',color);
plot3(...
    [xBnd(1), xBnd(1)],...
    [yBnd(2), yBnd(2)],...
    [zBnd(1), zBnd(2)],...
    'LineWidth',lineWidth','color',color);
plot3(...
    [xBnd(2), xBnd(2)],...
    [yBnd(2), yBnd(2)],...
    [zBnd(1), zBnd(2)],...
    'LineWidth',lineWidth','color',color);
plot3(...
    [xBnd(2), xBnd(2)],...
    [yBnd(1), yBnd(1)],...
    [zBnd(1), zBnd(2)],...
    'LineWidth',lineWidth','color',color);

end


